package com.javase.order.parent;

/**
 * 父类(业务实现)
 *
 * @author wangsh
 * @date 2018/11/21 10:10.
 */
public class Parent {
    /**
     * 静态代码块
     */
    static {
        System.out.println("Parent static code block");
    }

    /**
     * 类代码块
     */ {
        System.out.println("Parent code block");
    }

    /**
     * 构造器
     */
    public Parent() {
        System.out.println("Parent constructor");
    }

    public void speak() {
        System.out.println("Parent speak");
    }

    public void speak(String str) {
        System.out.println("Parent speak " + str);
    }
}
